package com.jinduplan.planmanager.mvp.contract

import com.cxz.kotlin.baselibs.bean.BaseBean
import com.cxz.kotlin.baselibs.mvp.IModel
import com.cxz.kotlin.baselibs.mvp.IPresenter
import com.cxz.kotlin.baselibs.mvp.IView
import com.jinduplan.planmanager.bean.HttpResult
import com.jinduplan.planmanager.bean.WeatherBean
import com.jinduplan.planmanager.bean.WeatherIpBean
import io.reactivex.rxjava3.core.Observable
import io.reactivex.rxjava3.core.Observer


/**
 * @author admin
 * @date 2018/11/20
 * @desc
 */
interface MainFragmentContract {

    interface View : IView {

        fun showTips(tips:String)

        fun setWeatherIpAdCode(adcode:String)

        fun setWeatherData(weatherBean: WeatherBean)


    }

    interface Presenter : IPresenter<View> {

        fun getTips()
        fun getWeatherIp()
        fun getWeather(adcode: String)
    }

    interface Model : IModel {

        fun getTips(): Observable<HttpResult<BaseBean>>
        fun getWeatherIp(): Observable<HttpResult<WeatherIpBean>>
        fun getWeather(adcode: String): Observable<HttpResult<WeatherBean>>

    }

}